package com.dgut.cbd.finalexp.dao;

import com.dgut.cbd.finalexp.entity.MyUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @Program: finalexp
 * @Description:
 * @Author: cbd
 * @Create: 2021-06-21
 * @Version: 1.0.0
 **/
@Repository
@Mapper
public interface UserDao {

    @Select("select * from user where id=#{id} limit 1")
    public MyUser loadUserFromId(String id);

    @Insert("insert into user (id,name,school,password,phone) values(#{id},#{name},#{school},#{password},#{phone})")
    public Boolean insertOneUser(MyUser user);

}
